//
//  Merge_MineAndFavor_Manager.h
//  KidReading
//
//  Created by YangShuai on 17/2/20.
//  Copyright © 2017年 刘赞黄Telen. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DBHelper+Merge_MineAndFavor.h"
@class TABLE_BOOKS;
@interface Merge_MineAndFavor_Manager : NSObject
+(Merge_MineAndFavor_Manager*)defaultManager;
//只获取我的图书或我的收藏缓存(应用第一次启动请求一次,再次点击取数据库数据)
-(void)getBooksWithMergeType:(MergeType)mergeType Success:(void(^)(NSArray * retArray))success;
//合并我的图书或者我的收藏
-(void)myBookManagerMergeMineOrMergeFavorWithWithMergeType:(MergeType)mergeType UpdateArray:(NSArray*)updateArray DeleteArray:(NSArray*)deleteArray Success:(void (^)(NSArray * retArray))success failure:(void (^)(NSError *error))failure;
//获取我的图书或我的收藏前?本
-(void)getBooksWithMergeType:(MergeType)mergeType MorethenBookCount:(NSInteger)bookCount Success:(void (^)(NSArray * retArray))success failure:(void (^)(NSError *error))failure cache:(void (^)(NSArray * cacheRetArray))cacheBack;
//切换账户重新获取数据
-(void)resetFirstRequestCompleted;
//删除或者添加先进入缓存表
-(void)updateTempTableWithBookModel:(TABLE_BOOKS*)bookModal WithTempType:(TempType)tempType MergeType:(MergeType)mergeType Completed:(void(^)())comp;
//同步缓存表中的数据
-(void)synchronousBooksDataWithNetWithMergeType:(MergeType)mergeType;
//同步本地图书顺序
-(void)updateAudioListSortWithSortStr:(NSString*)sortStr;
//判断一本书是否被收藏
-(BOOL)isFavorWithBookId:(NSInteger)bookId;

@end
